package com.gljx.web.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gljx.web.Entity.JournalEntry.TrainingStatistics;
import com.gljx.web.dao.TrainingStatisticsMapper;
import com.gljx.web.service.TrainingStatisticsService;

@Service
@Transactional
public class TrainingStatisticsServiceImpl implements TrainingStatisticsService{

	@Autowired
	private TrainingStatisticsMapper trainingStatisticsMapper;
	
	@Override
	public List<TrainingStatistics> queryStudentByTime(String companyId,String beginTime,String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectStudentByTime(map);
	}

	@Override
	public List<TrainingStatistics> queryShareCarTwoRegByCar(String companyId, String beginTime, String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectShareCarTwoRegByCar(map);
	}

	@Override
	public List<TrainingStatistics> querySubjectTwoResultEntryByTime(String companyId, String beginTime,
			String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectSubjectTwoResultEntryByTime(map);
	}

	@Override
	public List<TrainingStatistics> queryShareCarThreeRegEntryByTime(String companyId, String beginTime,
			String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectShareCarThreeRegEntryByTime(map);
	}

	@Override
	public List<TrainingStatistics> querySubjectThreeResulEntryByTime(String companyId, String beginTime,
			String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectSubjectThreeResulEntryByTime(map);
	}

	@Override
	public List<TrainingStatistics> querySubjectTwoResultEntryByYiDiAndTime(String companyId, String beginTime,
			String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectSubjectTwoResultEntryByYiDiAndTime(map);
	}

	@Override
	public List<TrainingStatistics> querySubjectThreeResultEntryByYiDiAndTime(String companyId, String beginTime,
			String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectSubjectThreeResultEntryByYiDiAndTime(map);
	}

	@Override
	public List<TrainingStatistics> queryOwnCarTrainEntryByTime(String companyId, String beginTime, String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectOwnCarTrainEntryByTime(map);
	}

	@Override
	public List<TrainingStatistics> queryOwnCarTrainEntryByTimeAndkms(String companyId, String beginTime,
			String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectOwnCarTrainEntryByTimeAndkms(map);
	}

	@Override
	public List<TrainingStatistics> queryStudentByMonth(String companyId, String beginTime, String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectStudentByMonth(map);
	}

	@Override
	public List<TrainingStatistics> queryShareCarTwoRegByCarAndMonth(String companyId, String beginTime,
			String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectShareCarTwoRegByCarAndMonth(map);
	}

	@Override
	public List<TrainingStatistics> querySubjectTwoResultEntryByMonth(String companyId, String beginTime,
			String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectSubjectTwoResultEntryByMonth(map);
	}

	@Override
	public List<TrainingStatistics> queryShareCarThreeRegEntryByMonth(String companyId, String beginTime,
			String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectShareCarThreeRegEntryByMonth(map);
	}

	@Override
	public List<TrainingStatistics> querySubjectThreeResulEntryByMonth(String companyId, String beginTime,
			String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectSubjectThreeResulEntryByMonth(map);
	}

	@Override
	public List<TrainingStatistics> querySubjectTwoResultEntryByYiDiAndMonth(String companyId, String beginTime,
			String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectSubjectTwoResultEntryByYiDiAndMonth(map);
	}

	@Override
	public List<TrainingStatistics> querySubjectThreeResultEntryByYiDiAndMonth(String companyId, String beginTime,
			String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectSubjectThreeResultEntryByYiDiAndMonth(map);
	}

	@Override
	public List<TrainingStatistics> queryOwnCarTrainEntryByMonth(String companyId, String beginTime, String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectOwnCarTrainEntryByMonth(map);
	}

	@Override
	public List<TrainingStatistics> queryOwnCarTrainEntryByTimeAndkmsAndMonth(String companyId, String beginTime,
			String endTime) {
		// TODO Auto-generated method stub
		Map<String, String> map = new HashMap<>();
		map.put("beginTime", beginTime);
		map.put("endTime", endTime);
		map.put("companyId", companyId);
		return trainingStatisticsMapper.selectOwnCarTrainEntryByTimeAndkmsAndMonth(map);
	}

}
